import { createApp,nextTick } from 'vue';
import { createPinia } from 'pinia';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import App from './App.vue';
import router from './router';
// import { usePermissStore } from './store/permiss';
import 'element-plus/dist/index.css';
import './assets/css/icon.css';
import "./assets/css/element-var.css"
 

const app = createApp(App);
app.use(createPinia());
app.use(router);

// 注册elementplus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}

// // 自定义权限指令
// const permiss = usePermissStore();
// app.directive('permiss', {
//     mounted(el, binding) {
//         // permiss.setDisabled(el,binding);
//         // nextTick(() => {
//         //     console.log('main执行——key:'+permiss.key);
//         // if (!permiss.key.includes(Number(binding.value))) {
//         //     el['hidden'] = true;
//         // }
//         // })
//     },
// })



app.mount('#app');
app.config.warnHandler = () => null;
